<?php
/**
 * Created by PhpStorm.
 * User: 氓羽
 * Date: 2018-4-13
 * Time: 14:36
 */
Class Test{
    private $abc = 'abc';

    public function __unset($var){
        echo("__unset:".$var);
        unset($this->$var);
    }
}

$test = new Test();
unset($test->abc);